﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" EnableEventValidation="false" CodeBehind="NotShippedGoodsList.aspx.cs" Inherits="Otgruzka.WebForms.NotShippedGoodsList" %>
<%@ Register Src="~/Controls/jQuery/JQueryDatepicker.ascx" TagPrefix="custom" TagName="Datepicker" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

        <div id="FiltersDiv">
            <p>
                <asp:Button ID="GoFilter" OnClick="NotShippedGoodsList_Filtr_click" Text="фильтровать" runat="server" Width="130px" />&nbsp;
                <span class='<%=IsFiltered ? "showen" : "hidden" %>"'>
                    <asp:Button ID="NotShippedGoodsListClearFiltr" name="NotShippedGoodsListClearFiltr" Text="Сбросить фильтр" OnClick="NotShippedGoodsList_Clear_Filtr" Width="130px" runat="server" />
                </span>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button runat="server" Text="Excel" ID="btnExcelButton" OnClick="btnExcelButton_Click" Visible="true" />
            </p>
        </div>

    <div id="DownloadFiles">
        <asp:DataList ID="DownloadFileList" runat="server" RepeatDirection="Vertical" Visible="false">
            <ItemTemplate>
                <asp:LinkButton ID="DownloadFile" OnClick="DownloadFile_Click" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "Key")%>' runat="server">
                    > Скачать список товаров поставщика '<%#DataBinder.Eval(Container.DataItem, "Key")%>'</asp:LinkButton>
            </ItemTemplate>
        </asp:DataList>
    </div>

    <asp:UpdatePanel ID="NotShippedGoodsListUpdatePanel" runat="server">
    <ContentTemplate>
        <div class='<%= (ErrorMessage.Text.Length==0) ? "hidden" : "showen" %>'>
            <div id="error_string" class="cError"><asp:Label ID="ErrorMessage" runat="server" /></div>
        </div>

        <table border="0" style="width: 99%">
            <tr>
                <td style="width: 100%">
                    <div id="DivNotShippedGoodsList">
                        <asp:GridView ID="gvNotShippedGoods" Runat="server" AutoGenerateColumns="False" CellPadding="5" Width="99%"
                            OnRowDataBound="gvNotShippedGoods_RowDataBound"
                            ShowHeader="true" BorderWidth="1"
                            ShowHeaderWhenEmpty="true">
                            <%--OnSelectedIndexChanged="NotShippedGoodsList_SelectedIndexChanged"--%>
                            <EmptyDataTemplate>Нет неотгруженных товаров</EmptyDataTemplate>
                            <Columns>
                                <asp:BoundField HeaderText="ID товара" HeaderStyle-Width="10px" ItemStyle-Width="10px" ItemStyle-HorizontalAlign="Center" DataField="ProductId" SortExpression="ProductId"></asp:BoundField>
                                <asp:TemplateField>
                                    <HeaderStyle Width="350px" />
                                    <HeaderTemplate>
                                        <span style="color:White;">Наименование товара</span><br />
                                        <asp:TextBox ID="HProductName" name="HProductName" runat="server" Width="250px" EnableViewState="true"></asp:TextBox>
                                    </HeaderTemplate>
                                    <ItemStyle HorizontalAlign="Left" />
                                    <ItemTemplate><%#DataBinder.Eval(Container.DataItem, "ProductName")%></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderStyle Width="10px" />
                                    <HeaderTemplate>
                                        <span style="color:White;">Количество<br />товара</span>
                                    </HeaderTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                    <ItemTemplate><%#DataBinder.Eval(Container.DataItem, "Count")%></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderStyle Width="100px" />
                                    <HeaderTemplate>
                                        <span style="color:White;">Артикул у поставщика</span><br />
                                        <asp:TextBox ID="HSupplierArtikul" name="HSupplierArtikul" runat="server" Width="100px" EnableViewState="true"></asp:TextBox>
                                    </HeaderTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                    <ItemTemplate><%#DataBinder.Eval(Container.DataItem, "SupplierArtikul")%></ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderStyle Width="100px" />
                                    <HeaderTemplate>
                                        <span style="color:White;">Наименование поставщика</span><br />
                                        <asp:TextBox ID="HSupplierName" name="HSupplierName" runat="server" Width="100px" EnableViewState="true"></asp:TextBox>
                                    </HeaderTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                    <ItemTemplate><%#DataBinder.Eval(Container.DataItem, "SupplierName")%></ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </div>
                </td>
            </tr>
        </table>
    </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="progressBar" runat="server" AssociatedUpdatePanelID="NotShippedGoodsListUpdatePanel">
        <ProgressTemplate>
            <div id="closebg">
                <div id="centered">
                    <asp:Image ID="ProgressImage" runat="server" ImageUrl="~/Images/ajax-loader.gif" style="vertical-align:middle; text-align:center;" AlternateText="Проверяются введенные данные" />
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
</asp:Content>
